package com.UnionPayCenter.account.annotation;

import com.UnionPayCenter.account.enums.PayChannelEnum;
import org.springframework.core.annotation.AliasFor;
import org.springframework.stereotype.Service;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
 * 支付注解
 */
@Retention(RetentionPolicy.RUNTIME)
@Service
public @interface PayService {

    /**
     * 支付渠道
     *
     * @return 支付渠道类型
     */
    PayChannelEnum channel();

    /**
     * 注册在spring容器内的bean的名字
     *
     * @return bean name
     */
    @AliasFor(annotation = Service.class)
    String value();
}
